package trash.Tmp;

public class ThreadTest implements Runnable
{
    public static void main(String[] args)
    {
        ThreadTest threadTest = new ThreadTest();
        Thread thread = new Thread(threadTest);
        thread.start();

        while (true)
        {
            System.out.println("Main Thread");
            try
            {
                Thread.sleep(5000);
            }
            catch (InterruptedException e)
            {
                e.printStackTrace();
            }
        }
    }

    @Override
    public void run()
    {
        while (true)
        {
            System.out.println("Thread ThreadTest");
            try
            {
                Thread.sleep(5000);
            }
            catch (InterruptedException e)
            {
                e.printStackTrace();
            }
        }
    }
}
